package com.baby.feign;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.youyicloud.entity.UserInfo;

@FeignClient(name="catchbaby-jpa-youyicloud")
public interface FeignClients {
	//==用户信息接口
	@RequestMapping(value="user/findUserById/{userId}",method=RequestMethod.GET)
	public UserInfo findUserById(@PathVariable("userId") Integer userId);
	
	@RequestMapping("user/findByFromInviteCode/{fromInviteCode}")
	public List<UserInfo> findByFromInviteCode(@PathVariable("fromInviteCode") String fromInviteCode);
	
	@RequestMapping(value="user/findAllUser")
	public List<UserInfo> findAllUser();
	
	@RequestMapping("user/findByOpenId/{openId}")
	public UserInfo findByOpenId(@PathVariable("openId") String openId);
	
	
	@RequestMapping("user/findByUserAccountAndPassword/{userAccount}/{passWord}")
	public List<UserInfo> findByUserAccountAndPassword(@PathVariable("userAccount")String userAccount,@PathVariable("passWord")String passWord);
	
	@RequestMapping("user/findByPhoneAndSecurityCode/{phone}/{securityCode}")
	public List<UserInfo> findByPhoneAndSecurityCode(@PathVariable("phone") String phone,@PathVariable("securityCode") String securityCode);
	
	@RequestMapping("user/findUserByPhone/{phone}")
	public List<UserInfo> findUserByPhone(@PathVariable("phone") String phone);
	
	@RequestMapping("user/findByInviteCode/{inviteCode}")
	public List<UserInfo> findByInviteCode(@PathVariable("inviteCode") String inviteCode);
	
}
